# -*- coding: utf-8 -*-
# @Author   : niejiali
# @Time     : 2019/3/1 8:40
# @File     : test003.py
# @Software : PyCharm

import os

file_path = r"C:\Users\its-162\Desktop\flaskapi\Example\test002.py"
(filepath, tempfilename) = os.path.split(file_path)
(filename, extension) = os.path.splitext(tempfilename)
#
# print(filename, extension)
# print(filepath, tempfilename)

paths = ['ConfigData.py', 'secure.py', 'setting.py', '__init__.py', '__pycache__']
for i in paths:
    print(os.path.splitext(i)[0])
    # if extension and extension == '.py':
    #     print(filename, extension)
